3.177 \(\int (d+e x)^2 \log (c (a+b x)^p) \, dx\)

Optimal. Leaf size=112 \[ -\frac{p x (b d-a e)^2}{3 b^2}-\frac{p (b d-a e)^3 \log (a+b x)}{3 b^3 e}+\frac{(d+e x)^3 \log \left (c (a+b x)^p\right )}{3 e}-\frac{p (d+e x)^2 (b d-a e)}{6 b e}-\frac{p (d+e x)^3}{9 e} \]

[Out]

-((b*d - a*e)^2*p*x)/(3*b^2) - ((b*d - a*e)*p*(d + e*x)^2)/(6*b*e) - (p*(d + e*x)^3)/(9*e) - ((b*d - a*e)^3*p*
Log[a + b*x])/(3*b^3*e) + ((d + e*x)^3*Log[c*(a + b*x)^p])/(3*e)

________________________________________________________________________________________

Rubi [A]  time = 0.073292, antiderivative size = 112, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {2395, 43} \[ -\frac{p x (b d-a e)^2}{3 b^2}-\frac{p (b d-a e)^3 \log (a+b x)}{3 b^3 e}+\frac{(d+e x)^3 \log \left (c (a+b x)^p\right )}{3 e}-\frac{p (d+e x)^2 (b d-a e)}{6 b e}-\frac{p (d+e x)^3}{9 e} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^2*Log[c*(a + b*x)^p],x]

[Out]

-((b*d - a*e)^2*p*x)/(3*b^2) - ((b*d - a*e)*p*(d + e*x)^2)/(6*b*e) - (p*(d + e*x)^3)/(9*e) - ((b*d - a*e)^3*p*
Log[a + b*x])/(3*b^3*e) + ((d + e*x)^3*Log[c*(a + b*x)^p])/(3*e)

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int (d+e x)^2 \log \left (c (a+b x)^p\right ) \, dx &=\frac{(d+e x)^3 \log \left (c (a+b x)^p\right )}{3 e}-\frac{(b p) \int \frac{(d+e x)^3}{a+b x} \, dx}{3 e}\\ &=\frac{(d+e x)^3 \log \left (c (a+b x)^p\right )}{3 e}-\frac{(b p) \int \left (\frac{e (b d-a e)^2}{b^3}+\frac{(b d-a e)^3}{b^3 (a+b x)}+\frac{e (b d-a e) (d+e x)}{b^2}+\frac{e (d+e x)^2}{b}\right ) \, dx}{3 e}\\ &=-\frac{(b d-a e)^2 p x}{3 b^2}-\frac{(b d-a e) p (d+e x)^2}{6 b e}-\frac{p (d+e x)^3}{9 e}-\frac{(b d-a e)^3 p \log (a+b x)}{3 b^3 e}+\frac{(d+e x)^3 \log \left (c (a+b x)^p\right )}{3 e}\\ \end{align*}

Mathematica [A]  time = 0.106499, size = 121, normalized size = 1.08 \[ \frac{b \left (6 b \left (3 a d^2+b x \left (3 d^2+3 d e x+e^2 x^2\right )\right ) \log \left (c (a+b x)^p\right )-p x \left (6 a^2 e^2-3 a b e (6 d+e x)+b^2 \left (18 d^2+9 d e x+2 e^2 x^2\right )\right )\right )+6 a^2 e p (a e-3 b d) \log (a+b x)}{18 b^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^2*Log[c*(a + b*x)^p],x]

[Out]

(6*a^2*e*(-3*b*d + a*e)*p*Log[a + b*x] + b*(-(p*x*(6*a^2*e^2 - 3*a*b*e*(6*d + e*x) + b^2*(18*d^2 + 9*d*e*x + 2
*e^2*x^2))) + 6*b*(3*a*d^2 + b*x*(3*d^2 + 3*d*e*x + e^2*x^2))*Log[c*(a + b*x)^p]))/(18*b^3)

________________________________________________________________________________________

Maple [C]  time = 0.51, size = 537, normalized size = 4.8 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*ln(c*(b*x+a)^p),x)

[Out]

-1/2*I*e*Pi*d*x^2*csgn(I*c)*csgn(I*(b*x+a)^p)*csgn(I*c*(b*x+a)^p)-1/3/b^2*e^2*a^2*p*x+1/3/b^3*e^2*ln(b*x+a)*a^
3*p+1/b*ln(b*x+a)*a*d^2*p-1/6*I*e^2*Pi*x^3*csgn(I*c*(b*x+a)^p)^3-1/2*I*Pi*d^2*x*csgn(I*c*(b*x+a)^p)^3-1/3/e*ln
(b*x+a)*d^3*p+ln(c)*d^2*x+1/3*e^2*ln(c)*x^3+1/6/b*e^2*a*p*x^2-d^2*p*x-1/9*e^2*p*x^3+e*ln(c)*d*x^2-1/2*d*e*p*x^
2+1/6*I*e^2*Pi*x^3*csgn(I*(b*x+a)^p)*csgn(I*c*(b*x+a)^p)^2+1/6*I*e^2*Pi*x^3*csgn(I*c)*csgn(I*c*(b*x+a)^p)^2-1/
2*I*e*Pi*d*x^2*csgn(I*c*(b*x+a)^p)^3+1/3*(e*x+d)^3/e*ln((b*x+a)^p)+1/b*e*a*d*p*x-1/b^2*e*ln(b*x+a)*a^2*d*p+1/2
*I*Pi*d^2*x*csgn(I*c)*csgn(I*c*(b*x+a)^p)^2+1/2*I*Pi*d^2*x*csgn(I*(b*x+a)^p)*csgn(I*c*(b*x+a)^p)^2+1/2*I*e*Pi*
d*x^2*csgn(I*(b*x+a)^p)*csgn(I*c*(b*x+a)^p)^2+1/2*I*e*Pi*d*x^2*csgn(I*c)*csgn(I*c*(b*x+a)^p)^2-1/2*I*Pi*d^2*x*
csgn(I*c)*csgn(I*(b*x+a)^p)*csgn(I*c*(b*x+a)^p)-1/6*I*e^2*Pi*x^3*csgn(I*c)*csgn(I*(b*x+a)^p)*csgn(I*c*(b*x+a)^
p)

________________________________________________________________________________________

Maxima [A]  time = 1.10382, size = 184, normalized size = 1.64 \begin{align*} -\frac{1}{18} \, b p{\left (\frac{2 \, b^{2} e^{2} x^{3} + 3 \,{\left (3 \, b^{2} d e - a b e^{2}\right )} x^{2} + 6 \,{\left (3 \, b^{2} d^{2} - 3 \, a b d e + a^{2} e^{2}\right )} x}{b^{3}} - \frac{6 \,{\left (3 \, a b^{2} d^{2} - 3 \, a^{2} b d e + a^{3} e^{2}\right )} \log \left (b x + a\right )}{b^{4}}\right )} + \frac{1}{3} \,{\left (e^{2} x^{3} + 3 \, d e x^{2} + 3 \, d^{2} x\right )} \log \left ({\left (b x + a\right )}^{p} c\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*log(c*(b*x+a)^p),x, algorithm="maxima")

[Out]

-1/18*b*p*((2*b^2*e^2*x^3 + 3*(3*b^2*d*e - a*b*e^2)*x^2 + 6*(3*b^2*d^2 - 3*a*b*d*e + a^2*e^2)*x)/b^3 - 6*(3*a*
b^2*d^2 - 3*a^2*b*d*e + a^3*e^2)*log(b*x + a)/b^4) + 1/3*(e^2*x^3 + 3*d*e*x^2 + 3*d^2*x)*log((b*x + a)^p*c)

________________________________________________________________________________________

Fricas [A]  time = 2.01714, size = 369, normalized size = 3.29 \begin{align*} -\frac{2 \, b^{3} e^{2} p x^{3} + 3 \,{\left (3 \, b^{3} d e - a b^{2} e^{2}\right )} p x^{2} + 6 \,{\left (3 \, b^{3} d^{2} - 3 \, a b^{2} d e + a^{2} b e^{2}\right )} p x - 6 \,{\left (b^{3} e^{2} p x^{3} + 3 \, b^{3} d e p x^{2} + 3 \, b^{3} d^{2} p x +{\left (3 \, a b^{2} d^{2} - 3 \, a^{2} b d e + a^{3} e^{2}\right )} p\right )} \log \left (b x + a\right ) - 6 \,{\left (b^{3} e^{2} x^{3} + 3 \, b^{3} d e x^{2} + 3 \, b^{3} d^{2} x\right )} \log \left (c\right )}{18 \, b^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*log(c*(b*x+a)^p),x, algorithm="fricas")

[Out]

-1/18*(2*b^3*e^2*p*x^3 + 3*(3*b^3*d*e - a*b^2*e^2)*p*x^2 + 6*(3*b^3*d^2 - 3*a*b^2*d*e + a^2*b*e^2)*p*x - 6*(b^
3*e^2*p*x^3 + 3*b^3*d*e*p*x^2 + 3*b^3*d^2*p*x + (3*a*b^2*d^2 - 3*a^2*b*d*e + a^3*e^2)*p)*log(b*x + a) - 6*(b^3
*e^2*x^3 + 3*b^3*d*e*x^2 + 3*b^3*d^2*x)*log(c))/b^3

________________________________________________________________________________________

Sympy [A]  time = 3.18163, size = 223, normalized size = 1.99 \begin{align*} \begin{cases} \frac{a^{3} e^{2} p \log{\left (a + b x \right )}}{3 b^{3}} - \frac{a^{2} d e p \log{\left (a + b x \right )}}{b^{2}} - \frac{a^{2} e^{2} p x}{3 b^{2}} + \frac{a d^{2} p \log{\left (a + b x \right )}}{b} + \frac{a d e p x}{b} + \frac{a e^{2} p x^{2}}{6 b} + d^{2} p x \log{\left (a + b x \right )} - d^{2} p x + d^{2} x \log{\left (c \right )} + d e p x^{2} \log{\left (a + b x \right )} - \frac{d e p x^{2}}{2} + d e x^{2} \log{\left (c \right )} + \frac{e^{2} p x^{3} \log{\left (a + b x \right )}}{3} - \frac{e^{2} p x^{3}}{9} + \frac{e^{2} x^{3} \log{\left (c \right )}}{3} & \text{for}\: b \neq 0 \\\left (d^{2} x + d e x^{2} + \frac{e^{2} x^{3}}{3}\right ) \log{\left (a^{p} c \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*ln(c*(b*x+a)**p),x)

[Out]

Piecewise((a**3*e**2*p*log(a + b*x)/(3*b**3) - a**2*d*e*p*log(a + b*x)/b**2 - a**2*e**2*p*x/(3*b**2) + a*d**2*
p*log(a + b*x)/b + a*d*e*p*x/b + a*e**2*p*x**2/(6*b) + d**2*p*x*log(a + b*x) - d**2*p*x + d**2*x*log(c) + d*e*
p*x**2*log(a + b*x) - d*e*p*x**2/2 + d*e*x**2*log(c) + e**2*p*x**3*log(a + b*x)/3 - e**2*p*x**3/9 + e**2*x**3*
log(c)/3, Ne(b, 0)), ((d**2*x + d*e*x**2 + e**2*x**3/3)*log(a**p*c), True))

________________________________________________________________________________________

Giac [B]  time = 1.27441, size = 423, normalized size = 3.78 \begin{align*} \frac{{\left (b x + a\right )} d^{2} p \log \left (b x + a\right )}{b} + \frac{{\left (b x + a\right )}^{2} d p e \log \left (b x + a\right )}{b^{2}} - \frac{2 \,{\left (b x + a\right )} a d p e \log \left (b x + a\right )}{b^{2}} - \frac{{\left (b x + a\right )} d^{2} p}{b} - \frac{{\left (b x + a\right )}^{2} d p e}{2 \, b^{2}} + \frac{2 \,{\left (b x + a\right )} a d p e}{b^{2}} + \frac{{\left (b x + a\right )}^{3} p e^{2} \log \left (b x + a\right )}{3 \, b^{3}} - \frac{{\left (b x + a\right )}^{2} a p e^{2} \log \left (b x + a\right )}{b^{3}} + \frac{{\left (b x + a\right )} a^{2} p e^{2} \log \left (b x + a\right )}{b^{3}} + \frac{{\left (b x + a\right )} d^{2} \log \left (c\right )}{b} + \frac{{\left (b x + a\right )}^{2} d e \log \left (c\right )}{b^{2}} - \frac{2 \,{\left (b x + a\right )} a d e \log \left (c\right )}{b^{2}} - \frac{{\left (b x + a\right )}^{3} p e^{2}}{9 \, b^{3}} + \frac{{\left (b x + a\right )}^{2} a p e^{2}}{2 \, b^{3}} - \frac{{\left (b x + a\right )} a^{2} p e^{2}}{b^{3}} + \frac{{\left (b x + a\right )}^{3} e^{2} \log \left (c\right )}{3 \, b^{3}} - \frac{{\left (b x + a\right )}^{2} a e^{2} \log \left (c\right )}{b^{3}} + \frac{{\left (b x + a\right )} a^{2} e^{2} \log \left (c\right )}{b^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*log(c*(b*x+a)^p),x, algorithm="giac")

[Out]

(b*x + a)*d^2*p*log(b*x + a)/b + (b*x + a)^2*d*p*e*log(b*x + a)/b^2 - 2*(b*x + a)*a*d*p*e*log(b*x + a)/b^2 - (
b*x + a)*d^2*p/b - 1/2*(b*x + a)^2*d*p*e/b^2 + 2*(b*x + a)*a*d*p*e/b^2 + 1/3*(b*x + a)^3*p*e^2*log(b*x + a)/b^
3 - (b*x + a)^2*a*p*e^2*log(b*x + a)/b^3 + (b*x + a)*a^2*p*e^2*log(b*x + a)/b^3 + (b*x + a)*d^2*log(c)/b + (b*
x + a)^2*d*e*log(c)/b^2 - 2*(b*x + a)*a*d*e*log(c)/b^2 - 1/9*(b*x + a)^3*p*e^2/b^3 + 1/2*(b*x + a)^2*a*p*e^2/b
^3 - (b*x + a)*a^2*p*e^2/b^3 + 1/3*(b*x + a)^3*e^2*log(c)/b^3 - (b*x + a)^2*a*e^2*log(c)/b^3 + (b*x + a)*a^2*e
^2*log(c)/b^3